package com.dmbjz.profilesdemo.config;

import com.dmbjz.profilesdemo.entity.Shop;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;


/** 只在test环境下生效的配置类 */
@Profile("test")
@Configuration
public class MyConfig {


    @Bean
    public Shop shop(){
        Shop shop = new Shop();
        shop.setId(1L);
        shop.setShopName("小猫");
        return shop;
    }

}
